<%@ page import="framework.common.Common" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
    <meta charset="utf-8">
    <title>牛皮</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">

    <!-- 引入框架的js、css等 -->
    <jsp:include page="${request.contextPath}/static/include.jsp" flush="true" />
    <link rel="stylesheet" href="<%=request.getContextPath()%>/static/css/modal.css?ver=<%=System.currentTimeMillis()%>" /> <%-- 模态框的css --%>

    <script type="text/javascript">
        //一般直接写在一个js文件中
        layui.config({
            base: '${request.contextPath}/libs/layuiExt/js/' //此处路径请自行处理, 可以使用绝对路径
        }).use([ 'form', 'layer'], function() {
            let form = layui.form
                ,$ = layui.jquery;

            verifyExt(form);
            form.on('submit(*)', function(data){ //form校验成功才会执行下面的代码
                //怎么刷新树状table
                ajax("/framework/SysUser.do?method=changePassword", serializeObject($("#bofrom")), {}, parent.treeGrid);
                return false; //禁用form表单自带的提交
            });

            /*
            formSelects.data('rolelid', 'server', {
                url: 'https://www.fastmock.site/mock/29487363107ab7d242c46305cadf4c52/formSelects/layui/data'
            });
            */
        });

    </script>
</head>

<body class="childBody">
    <form id="bofrom" class="layui-form">
        <%-- 主键 --%>
        <input type="hidden" name="lid" value="${bo.lid}">

        <div class="layui-form-item">
            <label class="layui-form-label"><span style="color:red">*</span>旧密码</label>
            <div class="layui-input-block">
                <input type="password" name="oldPassword" class="layui-input" lay-verify="required">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label"><span style="color:red">*</span>新的密码</label>
            <div class="layui-input-block">
                <input type="password" name="newPassword" class="layui-input" lay-verify="required">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label"><span style="color:red">*</span>确认密码</label>
            <div class="layui-input-block">
                <input type="password" name="comfirmNewPassword" class="layui-input" lay-verify="required">
            </div>
        </div>

        <!--隐藏的提交按钮，提供父页面调用  -->
        <div class="layui-form-item" style="display: none;">
            <div class="layui-input-inline">
                <button class="layui-btn form-submit-btn" lay-submit="" lay-filter="*">立即提交</button>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </div>
    </form>
</body>
</html>
